/* $RCSFile: SettingItemGroups.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/ADNCRM.Core/Configuration/Items/SettingItemGroups.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:27  christian.surieux
 *   Added Log to All cs files
 */

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;

using AddonNice.Diagnostics;

namespace AddonNice.Configuration
{
	/// <summary>
	/// SettingItemGroups, used to sort and group site and module
	/// settings in SettingsTable. 
	/// </summary>
	public enum SettingItemGroup : int
	{
        NONE                            =   0,

        MODULE_SPECIAL_SETTINGS         =   1,

        MODULE_SPECIAL_SETTINGS1        =   10000,
        
        MODULE_SPECIAL_SETTINGS2        =   20000,

        THEME_SETTINGS                  =   100000,

        LAYOUT_SETTINGS                 =   110000,
        
        ADVANCED_LAYOUT_SETTINGS        =   115000,

        SECURITY_USER_SETTINGS          =   120000,

        CULTURE_SETTINGS                =   130000,

        BUTTON_DISPLAY_SETTINGS         =   140000,

        SETTING_MANAGT_SETTINGS         =   150000,

        META_SETTINGS                   =   160000,

        MISC_SETTINGS                   =   170000,

        NAVIGATION_SETTINGS             =   180000,

        CRM_SETTINGS                    =   200000,
        // known packages
        CRM_ECOMMERCE_SETTINGS          =   300000,

        CRM_IMAGE_SETTINGS              =   400000,

        CRM_ADDRESS_SETTINGS            =   410000,

        CRM_EMAILING_SETTINGS           =   600000,

        CUSTOM_USER_SETTINGS            =   1000000,

    }

    public class SettingItemGroups : SortedDictionary<int, string>
    {
        public static SettingItemGroups AllGroups   =    new SettingItemGroups();
        public SettingItemGroups()
        {
            Add((int)SettingItemGroup.NONE,"None");
            Add((int)SettingItemGroup.THEME_SETTINGS,"THEME_SETTINGS");
            Add((int)SettingItemGroup.LAYOUT_SETTINGS,"LAYOUT_SETTINGS");
            Add((int)SettingItemGroup.ADVANCED_LAYOUT_SETTINGS,"ADVANCED_LAYOUT_SETTINGS");
            Add((int)SettingItemGroup.SETTING_MANAGT_SETTINGS,"SETTING_MANAGT_SETTINGS");
            Add((int)SettingItemGroup.SECURITY_USER_SETTINGS,"SECURITY_USER_SETTINGS");
            Add((int)SettingItemGroup.CULTURE_SETTINGS,"CULTURE_SETTINGS");
            Add((int)SettingItemGroup.BUTTON_DISPLAY_SETTINGS,"BUTTON_DISPLAY_SETTINGS");
            Add((int)SettingItemGroup.MODULE_SPECIAL_SETTINGS,"MODULE_SPECIAL_SETTINGS");
            Add((int)SettingItemGroup.META_SETTINGS,"META_SETTINGS");
            Add((int)SettingItemGroup.MISC_SETTINGS,"MISC_SETTINGS");
            Add((int)SettingItemGroup.NAVIGATION_SETTINGS,"NAVIGATION_SETTINGS");
            Add((int)SettingItemGroup.CUSTOM_USER_SETTINGS,"CUSTOM_USER_SETTINGS");
            Add((int)SettingItemGroup.CRM_SETTINGS,"CRM_SETTINGS");
            Add((int)SettingItemGroup.CRM_ECOMMERCE_SETTINGS,"CRM_ECOMMERCE_SETTINGS");
            Add((int)SettingItemGroup.CRM_IMAGE_SETTINGS,"CRM_IMAGE_SETTINGS");
            Add((int)SettingItemGroup.CRM_ADDRESS_SETTINGS,"CRM_ADDRESS_SETTINGS");
            if ( SettingsTraceSwitch.Sw.TraceVerbose )
                Trace.WriteLine( string.Format(CultureInfo.InvariantCulture,"[V]SettingItemGroups AllGroups created count: {0}", Count),SettingsTraceSwitch.Sw.Info);
       }
    }
}